local CheckWidgetType = UI.CheckWidgetType
local CheckArgType = UI.CheckArgType
local CheckArgWidget = UI.CheckArgWidget
local MakeAccessor = UI.MakeAccessor
local MakeTypeSetter = UI.MakeTypeSetter

--[[ MessageFrame @FIXME ]]--
local MessageFrame = UI.NewWidgetType("MessageFrame", {"Frame", "FontInstance"})
MessageFrame.parameters = {
	fading = false,
	data = {},
}

function MessageFrame:Initialize(o)
	local t = UI.params[o]
	assert(t)
end

function MessageFrame.prototype:SetFading(state)
	CheckWidgetType("MessageFrame:SetFading", self, "Frame")
	UI.params[self].fading = state and true or false
end

function MessageFrame.prototype:AddMessage(text)
	CheckWidgetType("MessageFrame:AddMessage", self, "MessageFrame")
	local t = UI.params[self].data
	t[#t + 1] = text
	log("II AddMessage: %q", text)
end

